﻿#region Using Statements
using System;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;
using System.Text;
using Microsoft.Xna.Framework;
using System.Collections.Generic;
#endregion

namespace TheSpirit
{
    public static class Fonts
    {
        #region Fonts

        private static SpriteFont segoe14;
        public static SpriteFont Segoe14
        {
            get { return segoe14; }
        }

        #endregion


        #region Font Colors

        public static readonly Color CountColor = new Color(79, 24, 44);
        public static readonly Color TitleColor = new Color(59, 18, 6);
        public static readonly Color CaptionColor = new Color(228, 168, 57);
        public static readonly Color HighlightColor = new Color(223, 206, 148);
        public static readonly Color DisplayColor = new Color(68, 32, 19);
        public static readonly Color DescriptionColor = new Color(0, 0, 0);
        public static readonly Color RestrictionColor = new Color(0, 0, 0);
        public static readonly Color ModifierColor = new Color(0, 0, 0);
        public static readonly Color MenuSelectedColor = new Color(248, 218, 127);

        #endregion


        #region Initialize

        public static void LoadContent(ContentManager content)
        {
            segoe14 = content.Load<SpriteFont>("Fonts/Segoe14");
        }

        public static void UnloadContent()
        {
            segoe14 = null;
        }

        #endregion


        #region Draw

        public static void CenterDraw(SpriteBatch spriteBatch, SpriteFont font, string text, Vector2 position, Color color)
        {
            Vector2 textSize = font.MeasureString(text);
            Vector2 centeredPosition = new Vector2(
                position.X - (int)textSize.X / 2,
                position.Y - (int)textSize.Y / 2);

            spriteBatch.DrawString(font, text, centeredPosition, color, 0f, Vector2.Zero, 1f, SpriteEffects.None, 1f - position.Y / 720f);
        }

        public static void Draw(SpriteBatch spriteBatch, SpriteFont font, string text, Vector2 position, Color color)
        {
            spriteBatch.DrawString(font, text, position, color, 0f, Vector2.Zero, 1f, SpriteEffects.None, 1f - position.Y / 720f);
        }

        #endregion

    }
}
